package com.baymax.test.scene.provider

import android.os.Binder
import android.util.Log
import com.baymax.test.scene.internal.BackGround
import kotlinx.coroutines.*
import kotlin.coroutines.EmptyCoroutineContext

/**
 * @title:       标题
 * @project:     TestScene
 * @package:     com.baymax.test.scene.provider
 * @class:       TestBinder
 * @description:
 * <p>
 * 类描述
 * </p>
 *
 * @version:   1.0
 * @createDate:   2023/1/31 17:59
 * @Copyright (C) 2023 YSTEN
 * @author:       xuyujian
 */
class TestBinder(backGround: BackGround) : Binder() {

    init {
        this.linkToDeath({
            Log.d("TestBinder", "server:: TestBinder:linkToDeath ");
        } ,0)
//        backGround.launch {
//            while (pingBinder()){
//                Log.d("TestBinder", "TestBinder:ALIVE ");
//                delay(300)
//            }
//            Log.d("TestBinder", "TestBinder:DIED ");
//        }
    }

    fun  foo(){
        Log.d("TestBinder", "server:: TestBinder:foo ")
    }

    override fun toString(): String {
        return "TestBinder()"
    }


}